package com.xiangge.zuoye2;

public class Demo3 {
    public static void main(String[] args) {
        int[] arr = new int[6];
        int sum = 0;
        for (int i = 0; i < 6; i++) {
            arr[i] = (int)(Math.random()*(100+1-0));
        }
//        for (int i = 0; i < arr.length; i++) {
//            System.out.print(arr[i]+" ");
//        }
        for (int i = 0; i < arr.length; i++) {
            sum = sum+  arr[i];
        }

        System.out.println("sum = " + sum);
    }
}
